package com.xinghou.platform.ienum;

/**
 * 监听消息枚举类
 *
 * Created by qingshengzheng on 16/4/28.
 */
public enum ConsumerEnum {

    CARD(1), EXPOSURE(2), INTERESTDYNAMIC(3), STORE(4), USER(5),
    REGISTERHX(6)
    ;
    private int type;


    private ConsumerEnum(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public ConsumerEnum getEnumFromType(int type) {
        switch (type) {
            case 1:
                return CARD;
            case 2:
                return EXPOSURE;
            case 3:
                return INTERESTDYNAMIC;
            case 4:
                return STORE;
            case 5:
                return USER;
            case 6:
                return REGISTERHX;
            default:
                return null;

        }
    }

}
